

#ifndef __GWINDOWMGR_H__
#define __GWINDOWMGR_H__

#include <vector>
using namespace std;
class CGWindow;

class CGWindowMgr
{ 
public:
	static CGWindowMgr* ms_pSingleton;
	vector<CGWindow *> m_listWindow;
public:
	CGWindowMgr( void )
	{
		////		assert( !ms_pSingleton );
		ms_pSingleton = static_cast<CGWindowMgr*>(this);
	}
	virtual ~CGWindowMgr(){}

public:
	static CGWindowMgr* /*CGWindowMgr::*/getSingletonPtr()
	{

		if (!ms_pSingleton)
		{
			ms_pSingleton = new CGWindowMgr();			
		}
		return ms_pSingleton;

	}
	static void DestroySingleton()
	{
		//		assert(ms_pSingleton);
		if(ms_pSingleton)
		{
			delete ms_pSingleton;
			ms_pSingleton = NULL;
		}
	}

	void regWindow( CGWindow * pWindow );
	void advanceTime( float fElaspedTime );
	CGWindow *getWindow( GtkWidget *_pGw );

};

//inline CGWindowMgr* GetWindowMgr() { return CGWindowMgr::getSingletonPtr(); }


#endif //__GWINDOWMGR_H__


